rm -rf TEST4
make clean
make server
make client
make server-admin
make genuid
mkdir TEST4
choices=5
cd TEST4
N=10
../genuid $N
gnome-terminal --command="bash -c '../server --choices=$choices; echo hit ENTER...; read'"
sleep 2
../server-admin --reg
sleep 1
for ((i = 0; i < $N; i++)); do echo $i; ../client --uid=$i --passwd=`cat $i` --keyfile=K$i --reg; done
sleep 1
../server-admin --tally-keys
sleep 1
for ((i = 0; i < $N; i++)); do echo $i; ../client --keyfile=K$i --tally-key; done
sleep 1
../server-admin --vote
sleep 1
#for ((i = 0; i < $N; i++));
#do 
#	echo $i
#	../client --keyfile=K$i --vote=$((`cat /dev/urandom|od -N1 -An -i` % $choices))
#done
../client --keyfile=K0 --vote=0
../client --keyfile=K1 --vote=0
../client --keyfile=K2 --vote=0
../client --keyfile=K3 --vote=0
../client --keyfile=K4 --vote=1
../client --keyfile=K5 --vote=1
../client --keyfile=K6 --vote=1
../client --keyfile=K7 --vote=2
../client --keyfile=K8 --vote=2
../client --keyfile=K9 --vote=3
sleep 1
../server-admin --tally
sleep 1
for ((i = 0; i < $N; i++)); do echo $i; ../client --keyfile=K$i --tally; done
sleep 1
../server-admin --done

